package cloud.ipanda;

import cloud.ipanda.base.WordUtils;

import java.io.File;
import java.net.URLEncoder;
import java.util.*;

public class Main {
    public static void main(String[] args) {



        System.out.println("Hello world!");


        //查询出来的数据
        Map<String,Object> map = new HashMap<>();
        WordUtils wordUtil = new WordUtils();
        Map<String, Object> params = new LinkedHashMap<String, Object>();
        List<String[]> testList = new ArrayList<String[]>();
        params.put("site","测试地点");
        params.put("startTime","2023年07月28日15时55分");
        params.put("endTime","16时30分");
        params.put("inquestName","河北震寰井巷建筑工程有限公司");
        params.put("principalName","刘玲");
        params.put("creditCode","911304023297824589");
        params.put("reviewedName","刘玲");
        params.put("reviewedSex","男");
        params.put("reviewedDuty","Java开发");
        params.put("idCard","130123199009303631");
        params.put("reviewedPhone","18931112383");
        params.put("reviewedAddress","邯郸市峰峰矿区");
        params.put("reviewedPostcode","050800");
        params.put("reviewedUnit","何玉英内科诊所");
        params.put("eyewitnessCardNo","130123100000000000");
        params.put("eyewitnessName","秦始皇");
        params.put("eyewitnessUnit","秦国");
        params.put("eyewitnessDuty","陛下");
        params.put("eyewitnessPhone","188888888888");

        List<File> p1File=new ArrayList<File>();
        p1File.add(new File("d:\\1.png"));
        params.put("p1",p1File);


        try{
            String path = "d:\\chechCause.docx";
            String name = "new.docx";
            String filename = URLEncoder.encode(name, "utf-8");
            wordUtil.getWord(path, params, testList, filename);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}